const fs = require('fs');

fs.writeFile('./hello.txt', "我是天才",{encoding:'utf-8',flag:'a+'}, (err) => {
    if (!err) {
        console.log("写入成功!!");
    }
});

fs.writeFile('./hello.txt', "我是大傻子 ", { encoding: 'utf-8', flag: 'a+' }, (err) => {
    if (!err)
    {
        console.log("写入成功");    
    }
})